package fun.chutianshu.springsecurity_04.controller;

import fun.chutianshu.springsecurity_04.entity.SysRoleUser;
import fun.chutianshu.springsecurity_04.service.SysRoleUserService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 用户角色中间表(SysRoleUser)表控制层
 *
 * @author makejava
 * @since 2021-05-17 23:05:35
 */
@RestController
@RequestMapping("sysRoleUser")
public class SysRoleUserController {
    /**
     * 服务对象
     */
    @Resource
    private SysRoleUserService sysRoleUserService;

    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("selectOne/{id}")
    public SysRoleUser selectOne(@PathVariable(name="id") Long id) {
        return this.sysRoleUserService.queryById(id);
    }

}